-- GENERATED SPELL FOR [Tidewalker Depth-Seer] --


function spell0_21224(pUnit, Event) --@Healing Touch,Heal--
pUnit:FullCastSpellOnTarget(38658,pUnit)
pUnit:RegisterEvent('Sorts_21224', 606, 1)
end

function spell1_21224(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(38657,pUnit)
pUnit:RegisterEvent('Sorts_21224', 12000, 1)
end

function spell2_21224(pUnit, Event) --@Tranquility,Self--
pUnit:FullCastSpellOnTarget(38659,pUnit)
pUnit:RegisterEvent('Sorts_21224', 10000, 1)
end

function Sorts_21224(pUnit, Event)
local choix_sorts_21224 = math.random(0, 2)
if choix_sorts_21224 == 0 then
pUnit:RegisterEvent('spell0_21224', 1, 1)
end
if choix_sorts_21224 == 1 then
pUnit:RegisterEvent('spell1_21224', 1, 1)
end
if choix_sorts_21224 == 2 then
pUnit:RegisterEvent('spell2_21224', 1, 1)
end
end

function mob21224_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21224', math.random(1500, 3000), 1)
end

function mob21224_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21224_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21224_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21224, 1, 'mob21224_Action')
RegisterUnitEvent(21224, 2, 'mob21224_Leave')
RegisterUnitEvent(21224, 3, 'mob21224_Kill')
RegisterUnitEvent(21224, 4, 'mob21224_Die')
